export const request=(url,data)=>{
  return new Promise((resolve,reject)=>{
    wx.request({
      url: 'http://192.168.1.6/nfuSignIn-program/server'+url,
      data: data,
      success:(result)=>{
        resolve(result);
      },
      fail:(err)=>{
        reject(err);
      },
      complete:()=>{
        wx.hideLoading();
      }
    });
  })
}
export const requestPost = (url, data) => {
  return new Promise((resolve, reject) => {
    wx.request({
      url: 'http://192.168.1.6/nfuSignIn-program/server' + url,
      method:'POST',
      data: data,
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      success: (result) => {
        resolve(result);
      },
      fail: (err) => {
        reject(err);
      },
      complete: () => {
        wx.hideLoading();
      }
    });
  })
}